//
//  YYCache+NetworkCache.m
//  GuBoShi
//
//  Created by 袁斌 on 2017/4/6.
//  Copyright © 2017年 YiShi. All rights reserved.
//

#import "YYCache+NetworkCache.h"

NSString * const YSQuotationNewsListKey = @"YSQuotationNewsListKey";

@implementation YYCache (NetworkCache)

+ (instancetype)sharedCache
{
    static YYCache *sharedCache = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedCache = [YYCache cacheWithName:@"com.jxyr.lugong.networkCache"];
    });
    return sharedCache;
}

+ (NSInteger)getAllNetworkCacheSize
{
    return [[YYCache sharedCache].diskCache totalCost];
}

+ (void)removeAllNetworkCache
{
    [[YYCache sharedCache].diskCache removeAllObjects];
}

@end
